import request from '@/utils/request'

// 查询样本复份 列表
export function listSample(query) {
  return request({
    url: '/biobank/sample/list',
    method: 'get',
    params: query
  })
}

//查询样本复份列表,包含已删除
export function listAllSample(query) {
  return request({
    url: '/biobank/sample/getList',
    method: 'get',
    params: query
  })
}

// 查询样本复份 详细
export function getSample(sampBackupId) {
  return request({
    url: '/biobank/sample/' + sampBackupId,
    method: 'get'
  })
}

// 新增样本复份
export function addSample(data) {
  return request({
    url: '/biobank/sample',
    method: 'post',
    data: data
  })
}

// 修改样本复份
export function updateSample(data) {
  return request({
    url: '/biobank/sample/update',
    method: 'put',
    data: data
  })
}

// 删除样本复份
export function delSample(sampBackupId) {
  return request({
    url: '/biobank/sample/' + sampBackupId,
    method: 'delete'
  })
}

// 导出样本复份
export function exportSample(query) {
  return request({
    url: '/biobank/sample/export',
    method: 'get',
    params: query
  })
}

// 创建新样本
export function createSample(data) {
  return request({
    url: '/biobank/sample/create',
    method: 'post',
    data: data
  })
}

// 批量更新样本
export function updateSamples(data) {
  return request({
    url: '/biobank/sample/updateSamples',
    method: 'post',
    data: data
  })
}

// 通过qrCode获取样本信息
export function getSampleByQrCode(data) {
  return request({
    url: '/biobank/sample/getSampleByQrCode',
    method: 'post',
    data: data
  })
}

// 获取同样本其他复份信息
export function getSameSamples(data) {
  return request({
    url: '/biobank/sample/getSameSamples',
    method: 'post',
    data: data
  })
}

// 获取excel导入模板
export function getImportTemplate() {
  return request({
    url: '/biobank/sample/importTemplate',
    method: 'get'
  })
}

// 获取条码/二维码导入模板
export function getQrCodeTemplate() {
  return request({
    url: '/biobank/sample/importQrCodeTemplate',
    method: 'get'
  })
}

// 获取样本复份生命周期
export function getSampleLifeCycle(sampBackupId) {
  return request({
    url: '/biobank/sample/getSampleLifeCycle/' + sampBackupId,
    method: 'get'
  })
}

export function getSampSourceInfo(sourceId) {
  return request({
    url: '/biobank/source/getSourceInfo/' + sourceId,
    method: 'get'
  })
}

//用药信息查询列表
export function getPatientTreatmentInfo(data) {
  return request({
    url: '/biobank/source/getPatientTreatmentInfo',
    method: 'get',
    params: data
  })
}

//用药信息导出
export function ExportPatientTreatmentInfoVo(data) {
  return request({
    url: '/biobank/source/exportPatientTreatmentInfo',
    method: 'post',
    data: data
  })
}

//设置患者提醒
export function setUpPatientReminders(data) {
  return request({
    url: '/biobank/source/setUpPatientReminders',
    method: 'post',
    data: data
  })
}

//首页提醒患者信息
export function getPatientRemindersInfoToday(data) {
  return request({
    url: '/biobank/source/getPatientRemindersInfoToday',
    method: 'get',
    params: data
  })
}



// 获取当前患者数目
export function getPatientRemindersInfoTodayTotal() {
  return request({
    url: '/biobank/source/getPatientRemindersInfoTodayTotal',
    method: 'post'
  })
}

//样本源根据编号获取名称 getPatientInfo
export function getPatientInfo(data) {
  return request({
    url: '/biobank/source/getPatientInfo/' + data,
    method: 'get'
  })
}


export function getPatientYYInfoByIdCard(data){
  return request({
    url:'/biobank/source/getPatientYYInfoByIdCard',
    method:'get',
    params: data
  })
}

export function  getPatientZDInfoByIdCard(data){
  return request({
    url:'/biobank/source/getPatientZDInfoByIdCard',
    method:'get',
    params:data
  })
}

export function ExportPatientTreatmentInfoVoNew(data){
  return request({
    url: '/biobank/source/exportPatientYYInfo',
    method: 'post',
    data: data
  })
}

export function exportPatientZDInfo(data){
  return request({
    url: '/biobank/source/exportPatientZDInfo',
    method: 'post',
    data: data
  })
}

